var busServices = angular.module('busServices', ['ngResource']);

busServices.factory('Bus', ['$resource',
  function($resource) {
    return $resource('/rest/bus/test',{},{
      query: {method:'GET', params: {}, isArray: true, interceptor: {
    	  response: function(data) {
    		  data.data[0] = new Bus(data.data[0]);
    		  console.log("");
    	  },
    	  responseError: function(data) {
    		  console.log("");
    	  }
      }}
  })
}]);
